#include <iostream>
#include "SelecrServer.hpp"
#include <string>
#include <memory>

void Usage(const std::string &process)
{
    std::cout << "Usage: " << process << " server_port" << std::endl;
}

int main(int argc,char* argv[])
{
   if(argc != 2)
   {
        Usage(argv[0]);
        return -1;
   }

    uint16_t port = std::stoi(argv[1]);
    std::unique_ptr<SelectServer> ptr = std::make_unique<SelectServer>(port);
    ptr->Loop();


    return 0;
}